package com.compmov.socialnetwork;


import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class Perfil extends TabActivity  {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.detalles);
        Resources res = getResources(); 
        TabHost tabHost = getTabHost();  
        TabHost.TabSpec spec;  
        Intent intent;  

        // Create an Intent to launch an Activity for the tab (to be reused)
        intent = new Intent().setClass(this, DatosPersona.class);
        spec = tabHost.newTabSpec("Perfil").setIndicator("Perfil",
                          res.getDrawable(R.drawable.perfil))
                      .setContent(intent);        
        tabHost.addTab(spec);
       

        intent = new Intent().setClass(this, PlacesAdded.class);
        spec = tabHost.newTabSpec("Lugares").setIndicator("Lugares",
                          res.getDrawable(R.drawable.googlemaps))
                      .setContent(intent);
        
        tabHost.addTab(spec);
        
        intent = new Intent().setClass(this, Amigos.class);
        spec = tabHost.newTabSpec("Amigos").setIndicator("Amigos",
                          res.getDrawable(R.drawable.amigos))
                      .setContent(intent);
        tabHost.addTab(spec);

        int pes=0;
        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
        	pes=bundle.getInt("tipo");
		}
        tabHost.setCurrentTab(pes);
    }

}